import fs from 'fs'

function getFiles(fpath) {
    return new Promise(function(resolve, reject) {
        fs.readFile(fpath, 'utf8', (err, data) => {
            if (err) return reject(err)
            resolve(data)
        })
    })
}

getFiles('./files/one1.txt')
    .then((r1) => { console.log(r1) })
    .catch((err) => { console.log(err) })
